package com.z6school.manage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.z6school.manage.common.pojo.DeptMajorClass;
import com.z6school.manage.common.pojo.Nodes;
import com.z6school.manage.po.Majors;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface MajorMapper extends BaseMapper<Majors> {
    @Select("select*from majors")
    List<DeptMajorClass> findAll();

    @Delete("delete from majors where id=#{id}")
    int deleteByMajorId(Integer id);

    @Select("select id,name,parentId from majors")
    List<Nodes> findZTreeNodes();
}
